//@charset "utf-8";
define(function(require, exports, module) {
	try {
		//require('../static/views/userguide');
		require('../static/lib/slimscroll');

		$('#view_select_option').slimScroll({
			height: '220px',
			width: '100px',
			alwaysVisible: true,
			disableFadeOut: false,
			borderRadius: 0,
			scrollTop: '50px'
		});
		
		$('#jump').on('click', function () {
			$('#sidebarbox').slimscroll({
				'scrollTo': '50px'
			});
		});

		$.fn.setCursorPosition = function(position) {
		    if (this.lengh == 0)
		        return this;
		    return $(this).setSelection(position, position);
		};
		 
		$.fn.setSelection = function(selectionStart, selectionEnd) {
		    if (this.lengh == 0)
		        return this;
		    input = this[0];
		 
		    if (input.createTextRange) {
		        var range = input.createTextRange();
		        range.collapse(true);
		        range.moveEnd('character', selectionEnd);
		        range.moveStart('character', selectionStart);
		        range.select();
		    } else if (input.setSelectionRange) {
		        input.focus();
		        input.setSelectionRange(selectionStart, selectionEnd);
		    }
		 
		    return this;
		};
		$.fn.focusEnd = function() {
		    this.setCursorPosition(this.val().length);
		};

		var SliderView = require('./views/slider');
		new SliderView();

		var commonMethod = require('../static/lib/common');
		commonMethod.init();

		require('../static/views/search');
		require('../static/views/content');

		var FormView = require('../static/views/form');
		var formView = new FormView();
		formView.bind();

		var PlateListView = require('../static/views/platelist');
		new PlateListView();

		//添加动态板块
		require('../static/views/addStock');

	} catch (e) {
		// alert(e.message);
	}
});
